Skip to content

feat(chart): add support for bool extraArgs#6179

Open
farodin91 wants to merge 3 commits intokubernetes-sigs:masterfrom
farodin91:feat-chart-add-support-for-bool-extraArgs
Open

feat(chart): add support for bool extraArgs#6179
farodin91 wants to merge 3 commits intokubernetes-sigs:masterfrom
farodin91:feat-chart-add-support-for-bool-extraArgs

Conversation

@farodin91
Copy link
Copy Markdown
Contributor

What does it do ?

Support kind bool for extraArgs

Motivation

as envfrom isn't wanted, it would be great use extraargs with booleans

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 9, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @farodin91. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 9, 2026
@k8s-ci-robot k8s-ci-robot requested a review from szuecs February 9, 2026 12:08
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 9, 2026
@ivankatliarchuk
Copy link
Copy Markdown
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 20, 2026
@ivankatliarchuk
Copy link
Copy Markdown
Member

Are you sure

extraArgs:
        - --extraArgABool
        - --extraArgBBool

Does not work? The project supports

--ignore-ingress-tls-spec
--no-ignore-ingress-tls-spec

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 20, 2026

Pull Request Test Coverage Report for Build 22539991316

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.005%) to 79.278%

Files with Coverage Reduction New Missed Lines %
openshift_route.go 1 83.59%
Totals Coverage Status
Change from base Build 22526174103: -0.005%
Covered Lines: 16080
Relevant Lines: 20283

💛 - Coveralls

@farodin91
Copy link
Copy Markdown
Contributor Author

@ivankatliarchuk I'm a bit confused. i should remove the whitespace.

I added a tests with does it in the expected way: https://github.com/kubernetes-sigs/external-dns/pull/6179/changes#diff-bc73335a2fc76673f78676b9284eba373396c0efb1dcca92a3d96c416c756685R175

@ivankatliarchuk
Copy link
Copy Markdown
Member

This feature is currently supported. You could try

      extraArgs:
        --combine-fqdn-annotation:
        --no-expose-internal-ipv6:

The proposed solution not too sure, seems redundant

If this is what we want

  - it: should allow 'extraArgs' with boolean flags
    set:
      extraArgs:
        --combine-fqdn-annotation
        --no-expose-internal-ipv6

    asserts:
      - equal:
          path: spec.template.spec.containers[?(@.name == "external-dns")].args
          value:
            - --log-level=info
            - --log-format=text
            - --interval=1m
            - --source=service
            - --source=ingress
            - --policy=upsert-only
            - --registry=txt
            - --provider=aws
            - --combine-fqdn-annotation
            - --no-expose-internal-ipv6

What is required

    156 +            {{- if kindIs "string" .Values.extraArgs }}
      157 +            {{- range (splitList " " .Values.extraArgs) }}
      158 +            {{- if . }}
      159 +            - {{ tpl . $ }}
      160 +            {{- end }}
      161 +            {{- end }}
      162 +            {{- end }}

But this will not allow map, or slices to be added.

Something like this, if we have mix of values

extraArgs:
  extraArgA: valueA
  combine-fqdn-annotation:
  no-expose-internal-ipv6:

Or

  - it: should allow 'extraArgs' with mix of flags with and without values
    set:
      extraArgs:
      - --extraArgA=valueA
      - --combine-fqdn-annotation
      - --no-expose-internal-ipv6

    asserts:
      - equal:
          path: spec.template.spec.containers[?(@.name == "external-dns")].args
          value:
            - --log-level=info
            - --log-format=text
            - --interval=1m
            - --source=service
            - --source=ingress
            - --policy=upsert-only
            - --registry=txt
            - --provider=aws
            - --combine-fqdn-annotation
            - --extraArgA=valueA
            - --no-expose-internal-ipv6

@ivankatliarchuk
Copy link
Copy Markdown
Member

file values.yml most likely need a commented out example with mix of flags, and schema to support string for extraArgs

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
@farodin91
Copy link
Copy Markdown
Contributor Author

farodin91 commented Feb 23, 2026

I want to add the bool variant, as this allows me to override it with different value in a values.yaml file. This isn't straightforward with an array, and I don't like the idea of unsetting.

@farodin91
Copy link
Copy Markdown
Contributor Author

Example with values.yaml and values.prod.yaml:
values.yaml

extraArgs:
  dev-arg: true

values.prod.yaml

extraArgs:
  dev-arg: false

helm template prod . -f values.prod.yaml

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
@farodin91 farodin91 force-pushed the feat-chart-add-support-for-bool-extraArgs branch from 30aaeed to 1a8b151 Compare February 23, 2026 08:51
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 23, 2026
Copy link
Copy Markdown
Contributor

@stevehipwell stevehipwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @farodin91, it looks good in principal.

Comment thread charts/external-dns/README.md.gotmpl
Comment thread charts/external-dns/values.yaml Outdated
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from stevehipwell. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: farodin91 <github@jan-jansen.net>
@farodin91 farodin91 force-pushed the feat-chart-add-support-for-bool-extraArgs branch from 448a4ab to 88556ab Compare March 1, 2026 08:59
@ivankatliarchuk
Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 1, 2026
@ivankatliarchuk
Copy link
Copy Markdown
Member

Fixes #6261

@farodin91
Copy link
Copy Markdown
Contributor Author

@ivankatliarchuk Anything to do?

@ivankatliarchuk
Copy link
Copy Markdown
Member

Nope. We are w8 for an approver

@mloiseleur mloiseleur requested a review from stevehipwell March 20, 2026 16:00
@vflaux vflaux mentioned this pull request Apr 6, 2026
3 tasks
@farodin91
Copy link
Copy Markdown
Contributor Author

@stevehipwell Any Update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants